#include "headfiles.h"

using namespace std;

int main(int argc, char **argv) {
	if (argc != 3) {
		cout << "Usage: " << argv[0] << " node_file sum" << endl;
		return 0;
	}

	string file_name(argv[1]);
	int sum;
	sum = atoi(argv[2]);

	NODE *head = createBinaryTree((char *)file_name.c_str());
	if (head == NULL) {
		cout << "No binary tree is created!" << endl;
		return 1;
	}

	calcPathsWRTSum(head, sum);

	destroyTree(head);

	return 0;
}

